<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Inclined Rectangle with Protrusions</title>
  <style>
    body {
      padding: 50px;
    }

    .parallelogram {
      position: relative;
      float: left;
      padding: 10px 10px;
      color: #000;
      margin: 0 5px;
      min-width: 50px;
      text-align: center;
    }

    .parallelogram::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      z-index: -1;
      background-color: #f0f0f0;
      transform: skew(-20deg);
    }

    .parallelogram:nth-child(1)::before {
      left: 15px;
    }

    .parallelogram:nth-child(1)::after {
      content: '';
      position: absolute;
      top: 0;
      right: 10px;
      bottom: 0;
      left: 0px;
      z-index: -1;
      background-color: #f0f0f0;
      border-radius: 6px;
    }

    .boxue .parallelogram:nth-last-child(1)::before {
      right: 20px;
    }

    .boxue .parallelogram:nth-last-child(1)::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 20px;
      z-index: -1;
      background-color: #f0f0f0;
      border-radius: 6px;
    }

    .parallelogram.active {
      color: #fff;
    }

    .parallelogram.active::after,
    .parallelogram.active::before,
    .boxue .parallelogram.active:nth-last-child(1)::after {
      background-color: #5e7bdf;
    }
  </style>
</head>

<body>

  <div class="boxue">
    <span class="parallelogram active">Your text here</span>
    <span class="parallelogram">设备</span>
    <span class="parallelogram">Your text here</span>
    <span class="parallelogram active">Your text here</span>
    <span class="parallelogram">Your text here</span>
    <span class="parallelogram">超长字符&超长字符&超长字符</span>
    <span class="parallelogram active">Your text here</span>
  </div>

</body>

</html>